<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/WEB-INF/templates/BasicTemplate.xhtml">

	<ui:define name="content">
		<f:event type="preRenderView" listener="#{ojtController.beforeEdit}" />
		<div class="title ui-widget-header ui-corner-all">
			<h:panelGrid style="margin:auto;">
		EDITAR OJT
		</h:panelGrid>

		</div>
		<h:form id="formEdit">


			<h:panelGrid style="margin:auto;">

				<h:panelGrid style="margin:auto;text-align:center;">
					<p:messages id="messages"></p:messages>
				</h:panelGrid>

				<h:panelGrid columns="4">

					<p:outputLabel value="Postulante: "></p:outputLabel>
					<p:outputLabel
						value="#{ojtController.ojtSelected.training.interview.candidate.firstname} #{ojtController.ojtSelected.training.interview.candidate.lastname}"
						id="name"></p:outputLabel>

					<p:outputLabel value="Capacitacion: "></p:outputLabel>
					<p:outputLabel value="#{ojtController.ojtSelected.training.id}"
						id="training_id"></p:outputLabel>

					<p:outputLabel value="DNI: "></p:outputLabel>
					<p:outputLabel
						value="#{ojtController.ojtSelected.training.interview.candidate.documentNumber}"
						id="document_number"></p:outputLabel>

					<p:outputLabel value=""></p:outputLabel>
					<p:outputLabel value="">
					</p:outputLabel>

					<p:spacer height="4"></p:spacer>
					<p:spacer height="4"></p:spacer>
					<p:spacer height="4"></p:spacer>
					<p:spacer height="4"></p:spacer>

					<p:outputLabel value="Estado"></p:outputLabel>
					<p:selectOneMenu value="#{ojtController.stateSelected}"
						disabled="#{!ojtController.isPending}" required="true"
						requiredMessage="Debe seleccionar Estado">
						<f:selectItems value="#{ojtController.states}"></f:selectItems>
					</p:selectOneMenu>

					<p:outputLabel value="Fecha de OJT"></p:outputLabel>
					<p:calendar value="#{ojtController.ojtSelected.ojtAt}"
						disabled="#{!ojtController.isPending}"
						pattern="dd-MM-yyyy hh:mm:ss a" required="true" stepMinute="10"
						requiredMessage="Debe seleccionar fecha de OJT">
					</p:calendar>


					<p:outputLabel value="Comentarios:"></p:outputLabel>
					<p:inputTextarea value="#{ojtController.ojtSelected.comment}"
						rows="4" cols="30"></p:inputTextarea>

				</h:panelGrid>

				<h:panelGrid style="margin:auto;text-align:center;">
					<p:commandButton action="#{ojtController.edit}" value="Editar"
						ajax="false">
					</p:commandButton>
				</h:panelGrid>

			</h:panelGrid>
		</h:form>
	</ui:define>

</ui:composition>
</html>
